home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / u_man / cat3 / Tk / getgc.z / getgc
Text File  |  1998-10-30  |  5KB  |  133 lines

  1.  
  2.  
  3.  
  4. TTTTkkkk____GGGGeeeettttGGGGCCCC((((3333TTTTkkkk))))                                                    TTTTkkkk____GGGGeeeettttGGGGCCCC((((3333TTTTkkkk))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      Tk_GetGC, Tk_FreeGC - maintain database of read-only graphics contexts
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ttttkkkk....hhhh>>>>
  13.  
  14.      GC
  15.      TTTTkkkk____GGGGeeeettttGGGGCCCC(_t_k_w_i_n, _v_a_l_u_e_M_a_s_k, _v_a_l_u_e_P_t_r)
  16.  
  17.      TTTTkkkk____FFFFrrrreeeeeeeeGGGGCCCC((((_d_i_s_p_l_a_y, _g_c)
  18.  
  19. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  20.      Tk_Window       _t_k_w_i_n       (in)      Token for window in which the
  21.                                            graphics context will be used.
  22.  
  23.      unsigned long   _v_a_l_u_e_M_a_s_k   (in)      Mask of bits (such as GGGGCCCCFFFFoooorrrreeeeggggrrrroooouuuunnnndddd
  24.                                            or GGGGCCCCSSSSttttiiiipppppppplllleeee) indicating which
  25.                                            fields of *_v_a_l_u_e_P_t_r are valid.
  26.  
  27.      XGCValues       *_v_a_l_u_e_P_t_r   (in)      Pointer to structure describing the
  28.                                            desired values for the graphics
  29.                                            context.
  30.  
  31.      Display         *_d_i_s_p_l_a_y    (in)      Display for which _g_c was allocated.
  32.  
  33.      GC              _g_c          (in)      X identifier for graphics context
  34.                                            that is no longer needed.  Must
  35.                                            have been allocated by TTTTkkkk____GGGGeeeettttGGGGCCCC.
  36.  
  37.  
  38. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  39.      TTTTkkkk____GGGGeeeettttGGGGCCCC and TTTTkkkk____FFFFrrrreeeeeeeeGGGGCCCC manage a collection of graphics contexts being
  40.      used by an application.  The procedures allow graphics contexts to be
  41.      shared, thereby avoiding the server overhead that would be incurred if a
  42.      separate GC were created for each use.  TTTTkkkk____GGGGeeeettttGGGGCCCC takes arguments
  43.      describing the desired graphics context and returns an X identifier for a
  44.      GC that fits the description.  The graphics context that is returned will
  45.      have default values in all of the fields not specified explicitly by
  46.      _v_a_l_u_e_M_a_s_k and _v_a_l_u_e_P_t_r.
  47.  
  48.      TTTTkkkk____GGGGeeeettttGGGGCCCC maintains a database of all the graphics contexts it has
  49.      created.  Whenever possible, a call to TTTTkkkk____GGGGeeeettttGGGGCCCC will return an existing
  50.      graphics context rather than creating a new one.  This approach can
  51.      substantially reduce server overhead, so TTTTkkkk____GGGGeeeettttGGGGCCCC should generally be
  52.      used in preference to the Xlib procedure XXXXCCCCrrrreeeeaaaatttteeeeGGGGCCCC, which creates a new
  53.      graphics context on each call.
  54.  
  55.      Since the return values of TTTTkkkk____GGGGeeeettttGGGGCCCC are shared, callers should never
  56.      modify the graphics contexts returned by TTTTkkkk____GGGGeeeettttGGGGCCCC.  If a graphics context
  57.      must be modified dynamically, then it should be created by calling
  58.      XXXXCCCCrrrreeeeaaaatttteeeeGGGGCCCC instead of TTTTkkkk____GGGGeeeettttGGGGCCCC.
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. TTTTkkkk____GGGGeeeettttGGGGCCCC((((3333TTTTkkkk))))                                                    TTTTkkkk____GGGGeeeettttGGGGCCCC((((3333TTTTkkkk))))
  71.  
  72.  
  73.  
  74.      When a graphics context is no longer needed, TTTTkkkk____FFFFrrrreeeeeeeeGGGGCCCC should be called
  75.      to release it.  There should be exactly one call to TTTTkkkk____FFFFrrrreeeeeeeeGGGGCCCC for each
  76.      call to TTTTkkkk____GGGGeeeettttGGGGCCCC.  When a graphics context is no longer in use anywhere
  77.      (i.e. it has been freed as many times as it has been gotten) TTTTkkkk____FFFFrrrreeeeeeeeGGGGCCCC
  78.      will release it to the X server and delete it from the database.
  79.  
  80.  
  81. KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  82.      graphics context
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.